//
//  NWalletXJWithdrawViewController.m
//  News
//
//  Created by zhangtao on 2018/11/5.
//  Copyright © 2018年 zt.td. All rights reserved.
//

#import "NWalletXJWithdrawViewController.h"

@interface NWalletXJWithdrawViewController ()
@property (nonatomic, assign) NSInteger payType;
@property (weak, nonatomic) IBOutlet UIView *mainView;
@property (weak, nonatomic) IBOutlet UILabel *monryLab;
@property (weak, nonatomic) IBOutlet UITextField *moneyTF;
@property (weak, nonatomic) IBOutlet UIButton *weixinBtn;
@property (weak, nonatomic) IBOutlet UIButton *zhifubapBtn;
@property (strong, nonatomic) IBOutletCollection(UITextField) NSArray *zhanghaoTF;
- (IBAction)zongMoneyBtnClick:(UIButton *)sender;
- (IBAction)tiXianAction:(UIButton *)sender;
- (IBAction)chooseBtnClick:(UIButton *)sender;

@end

@implementation NWalletXJWithdrawViewController

-(void)viewDidLayoutSubviews{
    _mainView.frame = CGRectMake(0, navHeight, ACEWidth, ACEHeight);
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"提现";
    
    self.monryLab.text = [NSString stringWithFormat:@"%@",self.money];
}

- (IBAction)zongMoneyBtnClick:(UIButton *)sender
{
    self.moneyTF.text = [NSString stringWithFormat:@"%@",self.money];
}

- (IBAction)tiXianAction:(UIButton *)sender
{
    [[NHTTPManage shareInstance] afPOST:HTTP_POST_GetCash andParam:@{@"token":TOKEN,@"cuid":CUID,@"pic":@""} success:^(id  _Nonnull responseObject) {
        
    } failture:^(id  _Nonnull error) {
        NSLog(@"%@",error);
    }];
}

- (IBAction)chooseBtnClick:(UIButton *)sender
{
    if (sender == self.weixinBtn) {
        self.payType = 1;
        [self.weixinBtn setImage:[UIImage imageNamed:@"1"] forState:UIControlStateNormal];
        [self.zhifubapBtn setImage:[UIImage imageNamed:@"2"] forState:UIControlStateNormal];
        
    } else if (sender == self.zhifubapBtn) {
        self.payType = 2;
        [self.weixinBtn setImage:[UIImage imageNamed:@"2"] forState:UIControlStateNormal];
        [self.zhifubapBtn setImage:[UIImage imageNamed:@"1"] forState:UIControlStateNormal];
    }
}

@end
